<template>
  <div>
    <div class="list">
        <div class="item" v-for="(item,index) in list" :key="item.id">
          <!-- <slot name="code" :index="index"></slot> -->
          <div class="first" v-if="isShow"> {{ index+1 }}</div>
          <div class="first" :class="{firstRed: index<3}" v-else> {{ index>8?index+1 :'0'+(index+1) }}</div>
          <div class="left">
            <div class="subtitle">{{ item.name }}<span>{{ item.alia[0] }}</span></div>
            <div class="author" ><span  v-for="ele in item.ar" :key="ele.id" class="ele">{{ ele.name }}</span>
            - {{ item.al.name }}</div>
        </div>
        <div class="right"></div>
      </div>
    </div>
  </div>
</template>

<script>

export default {
props:{
  isShow:{
    type:Boolean,
    default:true
  },
  list:{
    type:Array,
    default:function(){
      return []
    }
  }
}
}
</script>

<style lang="less" scoped>
.list{
  .item{
    display: flex;
  padding: 6px 13px;
  border-bottom: 1px solid #efebeb;
  .firstRed{
    color: df3436;
  }
.first{
    text-align: center;
    justify-content: center;
    font-size: 17px;
    width: 40px;
    color: #999;
    margin-left: -10px;
    margin-top:10px;

  }
  .left{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
    flex: 1;
    .subtitle{
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
    span{
      overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
      color: #888;
    margin-left: 4px;
    }
  }
  .author{
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
    .ele::after{
    content: ' / ';
  }
  .ele:last-child::after{
    content:'' ;
  }
  }
  }
  .right{
    width: .9rem;
  }
}
}
</style>